package com.sunsharing.dispatch.graph;

import java.util.ArrayList;

/**
 * 节点
 * User: criss
 * Date: 13-4-13
 * Time: 下午4:08
 * To change this template use File | Settings | File Templates.
 */
public class Vertex {
    //是否便利过
    boolean wasVisited;
    //节点名称
    public String label;
    //已经访问过的顶点
    ArrayList<Integer> allVisitedList;

    public boolean isWasVisited() {
        return wasVisited;
    }

    public void setWasVisited(boolean wasVisited) {
        this.wasVisited = wasVisited;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public ArrayList<Integer> getAllVisitedList() {
        return allVisitedList;
    }

    public void setAllVisitedList(ArrayList<Integer> allVisitedList) {
        this.allVisitedList = allVisitedList;
    }

    public Vertex(String lab)
    {
        label = lab;
        wasVisited = false;
    }

    public void setVisited(int j)
    {
        allVisitedList.set(j,1);
    }

}
